Another code duplication that just shouldn't be ;(