fixed #180; #226 is still a problem.