Fixing type casting in accept().