Fixed crash when values is read from RestApi before fully initialized (fixes #159).