Feature/misc fixes