removed use of g_memmove
updated for version 3.12.1