Fixed an error when setting an empty tape that raises an IndexError exception