fixing an init bug