Fixed compile error + reworked block code