Update state when loading module from memory

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>