Bugfix. Only callback if it's a function