fixed assertion handling for 0 - fixes #131