fixed bug #170 (for the most part)