Another fix for #3 (untested)