Added Ian's fix to line 202 (now line 209). Added constants but haven't replaced IDs in code yet.