fixed registration and profile bugs