bind and unbind on resume/pause