fix hash tail problem for images