fixed sql starting crash