indentation fixed, selection crossing bug fixed