Fixed logic error for init()