Fixed key.cpp