fix run-time error