small minor code improvements