Fix some errors & notices