Implemented check for resize inside forked code
Fixed shared variable