Adjustment: Ensured that popCallback was called outside of the synchronization block