fixed error with condition for no init, added new test case