Quick fix for issue #80 - Prevent callback from being called multiple times