Make callback function be called only once