fixed all scalar check + fixed typo