Alex's fix for numpy issue