fix unit examples under python3