Image Attachments Query Not Working If Post Is Loaded Via Ajax

Stupid me! There was an error in my AJAX call so I was passing the wrong post ID in the second case. So, nevermind guys.

(Is there a to delete a question? Can’t seem to find one).