fix block id calc and mining