fix code that is used on client but used code that incompatible with client