min max bug fixed, init draw bug fixed