Catch error when trying to remove modules in an empty box