Debugs and logics improvement.