replaced semaphore with primitive lock, adjusted drawing bounds