Do a down() on globalsm when resetting.

Otherwise the semaphore-value increases by 1 every time which may
lead to trouble.