Added resetting of the native refs when changing page