Updated implementation of endFirstRun method to check isFirstRun before it sets the user default.