NPE fix in ProfileController