fixes after @wowo code review