fix #7 (undefined method 'synchronize' for nil:NilClass)