Custom select fields fix for all databases