Fixing and disabling document buttons