fixes functional key hash code
fixes spec
fixes error endl
bugfix