got rid of runtime errors