fix minors issues with code