Added compatibility with BuddyPress