Fixed bug where sim was checking result of a dynamic_pointer_cast rather than the .get()