Based on gustavo 4.8 memset fix