fix Out of memory error issue. https://github.com/diegocarloslima/ByakuGallery/issues/1