Add center on platform function. Fixed #479