Device.java is updated to solve IndexOutOfBoundsException within updateAttachmentPoint()