Fixed issues reported in #16