Fix runtime exception on profile creation