fixing bug in capping face calculation