Gallery memory issue fixed.