Mega crash fix

Mega no longer crashes program