Fix for shrink function