Fix with calculation for inline event frame

fixes #4369