fixed allocation
fixed memory issues