Fixed a bug in writting zeros to a non-allocated section