add tests for #52, #66