fixes bug with setting time from json data