some ugly debugging.