fixed error
fixed sql again