Fxied some memory issues