fixed typo + error in select way cursor.