overlap bug fixed + waitEvent