fixing nested blocks