fixes checkbox to stay off or on