fixed syntax errors when invalid or out-of-date status is encountered