Fixed drivecheck function