Adjust crop condition
Remove useless code