Fix dictionary key collision by switching to list
Add stage safety check