change
ON to true;
OFF to false
using 0 and 1 shouldn't make any difference, there'd be another problem elsewhere in your code