some Flask
some small fixes