Fixed the setBlock method