minor changes to exception catching and behaviour