We fixed the check-function