Fixed constructor causing crashes by calling non-existing fields