Problem in memory management fixed