fixed a few issues with re-declaration. It is not seg faulting any more