bug fix in memory allocation