fixed minimize bug