Fixed NPE when SDK gives invalid skeleton reference