fix a sql bug and notify bug fixed