Fixed a bug causing a null value in completed_count in /api/profile/