Reworked code to try and fix autostat issue.