fix issue with newer numpy versions