minor code adjust