added a really lame sleep(1). looks like it takes a little bit for poltergeist to return and set the page.status_code...