patch by rayanAyar http://openmcu.ru/forum/index.php/topic,428.msg5218.html#msg5218