Fixed bug when missing code