Fixes for the Prolog datamodel