add some bugfixes
Merge pull request #26 from SIMS-Topaz/aja/bug_fixes

add some bugfixes