Code Problems

Maybe your switch pins are floating.
How are they wired?