Correct the typo in the function name toggleVisibility.
Move the first reference to this.visible in toggleVisbility so that
gotProperty doesn't fire prematurely.