fixed thickness bug