Fix permission check to only look at current stage