bugfix loading state