Some compatibility improvements