Solved bug regarding bad indexing and parsing of commands.