small fixes and util methods