Add test. Check #172 and #173