Fix bug with properties not working correctly