fix bug in mangage.py