Fixed Issues with Switching on and off