Fix parser incosistencies with scanner