mock commands, bug fixes