bugfix for statkey