fixed a bug where readings did not get submitted due to wrong error
correction