Fix valid_commands test
Bugfix: $valid_commands string was parsed as array