Corected getCameras function in API.cpp