fixed error notice - issue #4