clean up error checking in this case, fixes #112