fix bug about loader and flow