adds small fixes for bugs introduced by recent big merge