Bug Fixes for Static Compilation