Improved add application method to try fixing flakey tests