update flag check to use correct syntax

Didn't realise flags work differently in the back-end and front-end.