rm code causing problem