resolved issue of crashing app because of isFirstTime flag