Fixed issue with buggy working getBoundingClientRect() function