Fixed bug on block switching.