fixed missing synchronized block