Fixes catch for more specific exception as proposend by doconnor

Minor change