exception for missing keys in stack related functions