Added missing function that was causing the application to crash