fixed issue with id #276
verified #276 with additional tests. close #276