Two bugs in ATP fixed