updated to fix crash
updated to fix crash