error checking for .get bug fix