bug fix: used wrong position when adding block (replaced instead of attached new block)