Correctly removing the last thing

This is to make it work on windows.