Fixed Uncaught TypeError: Cannot read property 'fd' of null