Fixed render function.