Fixed a runtime error