cleanup and fix for sema