Bug Fixes.

#97, #87 and other minor bugs, solved.