Scanner now works properly