Fix runtime error