Fixed turnons/turnoffs in the right places