fixed bug with init