Fixed inputLoop with extendedCommands