Fix np exception