Improved shim, cause iOS5 was choking on the previous one :(
code-style