some minor code fix