Compare 0 with === and fix a bug where slide could be passed as a string.