Bugfixes, changes from 1/0 to true/false