block update and learning.py fixed