Hazrat Sha'bi (may Allah have mercy on him) said that intention is among the hidden things; intention is not considered in apparent matters.