fix small bugs for nextTo function