Added xsiframe linker and fixed tiny casting bug.