Bug fix

Fixed bug where inViewport when called multiple times only ran the last
instance of in/outFunctions.