[Bundle] Made code more robbust