Fix some ancient code