bug in constructor fixed