Temporary fix for toggle bug, See comments on this commit to go back and fix later.