Fix Some Errors & add some Functionalities