fix story inserting query