Fix some Logic for all APIS