code fix up