user fixes and database sql