Fix NPE with blocks