Major bug fixing in tile-coding