Added logic to correctly position Select's layer