Fix app frozen issue #1