Added fixed 10d0f code to my branch