Fix for some errors