Fix a bug initializing class properties