Added some robustness