Added missing deps. Fixed bug in key testing.