Replace a call to fromJust with fromMaybe

Closes #41