fixed a runtime error with development mode