gallery and camera out of memory bug fixed