fixing issue where @prediction isnt being set properly