Fixed OnLeave warning