fixed bugs
Merge pull request #53 from jamkcas/working

fixed bugs