FIXED: Updated sql