Fix runtime errors caused by last commit