a fix and unit tests for accept_check