Fix PB3 by moving frameElement within if condition--All good