fix bug: It does not work on the first access