using 2 methods to try and calculate the app for servlet in the hope it fixes the exception only seen in Travis