Added a comment and fixed a runtime error