This should be nicer.