Fix for certain versions of numpy