Fixed some bugs, added listen for monitor resize