Added ret != 0 back