fixed 2 little bugs (wrong index of skeleton, wrong index of device)

fixes #10 #8 #4