Fix build errors after 5.0.1