Fixed #144 and fixed #143