Fixed crash on reloading with brush selected