Fix some issues and errors

Happy new year to everyone! :-)