Fix name clash of cap variables