Bug fixing and more