Fixed bug in FlagController and CommentController