Adding v5 compatibility