correctly resize the log box