Updated shebang handling