fix a bug that shown event isn't exactly called after shown.