Fixes for key() and all()