fixed things to work with flask