fixed squashing and added a test for it