fixed imagecache to free memory