If statement wrong for baseUrl