Fixed a bug that allowed the user to pass in an invalid quantum value.