Fixed bug in callback.