Fixing remove on empty behaviour