replaced g_return_* macro usage with own macro