Fix bug on uninitialized rect