diff --git a/src/deh_soc.c b/src/deh_soc.c
index 9e3c2f2428ebe5c3eb13ab51401ca3c6b3a45520..aed0ca3b440d6f4891109c54c88446f808aebc5c 100644
--- a/src/deh_soc.c
+++ b/src/deh_soc.c
@@ -2687,10 +2687,10 @@ void readhuditem(MYFILE *f, INT32 num)
 			}
 			else if (fastcmp(word, "F"))
 			{
-				hudinfo[num].f = i;
+				hudinfo[num].f = get_number(word2);
 			}
 			else
-				deh_warning("Level header %d: unknown word '%s'", num, word);
+				deh_warning("HUD item %d: unknown word '%s'", num, word);
 		}
 	} while (!myfeof(f)); // finish when the line is empty