Workaround and remove of obsolete code