Fix several issues with the skinning system