Corrected some bugs with flask and folders