Adding the fix in hawks's code to my branch