Fix selector bounds detection from the right side. close #12