Changed the onRender method to onInitialise to prevent redirecting