Bug Fix in Flask Server