Put in more debug code to try and figure out if the correct values are being passed through.