First attempt at a fix. Not Validated.