Stopping exception on deploying