null ptr fix
Moved block validation as first step