fixed #21, finally!