Fix plugin compilation
Fix text width calculation