fixed a bug where the postRender would be called without the element being attached to the dom yet