Fixed code. Works for proxy pull. Doesn't work for master push.