crop frame correctly