Fixed check for custom grid template