bug fixed with undeclared currentProfile