Bugfix for inferencing