prevent magic number and a little bug fixed
Merge branch 'UI'