fixed #174 (second attempt)