Removed an unnecessary database query