Fixed the SD/HD bug