core: remove unnecessary return instructions for void methods
core: select correct array type element