deal with the HOME & END buttons problem