fix for #18, finally!