fixed bug in initialization.