Issue #143 Fixed bugs