added safety for elevator limit switch