changed crop image logic for FF