Modified fields search

If fields are being passed, adding the 'DISTINCT' option at the end of the fields query causes mysql errors - Pushing the fields to the top of the stack prevents the error