fix min issue