reworked chamaken's patch again