Slaven Bilic says he was relieved his side snatched a late goal against Swansea to win 1-0 after a poor first-half performance.