Fixes js activate and deactivate