Fix error conditions in mounting.