Found a few bugs in the command parsing, should be more robust now (might fix #5)