Fixed bug where datacontructor was trying to get a key value that did not exist