update and fix a stupid bug