updates and sql select fields fix