bugfix - move status_detail update out of the except block
bugfix syntax error
merge with the latest master