fixed bug regarding init