some error fixed for compatibility