Fixed render() bug