adjust the position and fix bug