Fix boolization and array store bugs