Fix image overflow bug.