Issue 138

added tests for issue #138, no other changes nessesary