Added support for bad blocks remapping