@isratrade noted, but you're checking lookup_keys_added, not lookup_keys - you've got two local variables here, one before and one after the POST.