refixed deg bug