Update shader loading and fix bugs