This sounds error prone and I remember I faced the same issue on the web app. I think this probably should be changed to

status =~ /^STORED/