rename internal functions for better errors

Signed-off-by: Jan Dvořák <mordae@anilinux.org>