Added rudimentary code to handle RuntimeWarnings