bug fix to be compatible with old versions