Fixing bugs in skeleton