Fixed issue where updating threw an exception