Trying to fix application crash error