Updated proc so it wouldn't block