#983 deactivation warning

Resolves #983.
Consider using something like this https://stackoverflow.com/questions/894860/set-a-default-parameter-value-for-a-javascript-function, it took me a little while to figure out what was going on here.