Fixed faulty scanning sequence 

fixes #123