Added more robustness