added check for double buttons