Catch non-existent axes

Need to add UnboundLocalError to the exception trapping.