Fixed bug in init()