Fixed some memory issues