Fixed additional bug with key error