Getloaded add boolean value cast

Rebased version of #242