remove duplicate code

@schiesbn @butonic @blizzz @ringmaster THX