Bug fix on ctor