Adaptive resolution
modify some bugs.