Wrapping in try/catch. Will need to figure out the problem at some point later.