fixed serious bug (#8)