minor fixes. Thanks to Danny Stefanic