Added onLowMemory handling