Added check-input.
Multiple fixes.