Added check to not call callback func if not given in some places.