Everything works - fixed updateRecord to check for space properly