Remove unneeded code that could be introducing bugs