working on #35

not certain if fix is correct. please review!