test and fix callbacks in BufferedPort class

fixes #198, thanks @pattacini for catching this