some changes buf frames not working correct