check if number input is correct. fixes #16