almost fixed staytime, fixed memset