fix bug with loaded states