Fixed an issue not detecting parentView