valgrind fix (conditional jump depending on unitialized value) and formatting