bugfixes for erc-fill-function