fix bug with init