select image correctly no matter which element you click