Switched to using ids for getFirstStackOfType