correct dead sprite removal code