Type fix + scanner fixes