fixed ram-bitclear routine