Fixes in compatibility function