Fix setting and getting trait properties inside class