Bug in checkParameters

Closes #4