Fix bug and ui improvement