Fixed scanner and added invalid tokens