minior code improvements
fixing bug, issue #210