Fixed undefined 0 or 1 error.