Fix beamer usage bugs