Changed state flag to byte.