Removing redundant code added in error