Fixed a hanging bug and further updates