Fixes #129 and #130

Another test for #61 which fixes also issues #129 and #130