fix bug in create_access_history