remove code causing exceptions