Fixing phantom code