Changed synchronized methods by synchronized blocks