Change stock level management to handle strings properly