fixed minimize issue