Fixed an issue with id field getting reset to 'null'