Fixed a problem when croppping