fixed np exception