Some more bug fixes

Numpy fixes