Fixing type of the RuntimeException