fixed minor bugs
fixes issue #2