fix callbacks and add missing spec [fix #682]