Fixed a problem with the sword script.