Fix JS auto detection