Fixing GAE instance check