Fixed compile errors when building in Release mode