Little optimization in mPlane, originally by Winterleaf