Fixed the bug where it returned error pages when given wrong input types