Fixed NPE on getLastMedia