fixed fromJust Nothing error