fix small bug with Apabi checking