Fixed mysql error with visible field