took out my first fix for #179, restored vitoshka's fix for #177