Improve performance while keeping compatibility