This is kind of ugly. Anyone know a better solution?