fixed sqlissue