Fix cast to Integer error.