Fixing fields name
Fixing sql. Fixing code