Added index to profiles table.

Fixes #518
ye ol' copy paste problems