Switching to compileClient method to avoid deprecation warning