Your magas is loose because you may have added too much ghee. Roast some besan and add it to the mix, adjust the sugar and try to set it again. This could also happen if you add sugar to the magas mix while it is still hot.