fixed cross detection bug