Removed ugly code.