changed camera resourse management. hopefully it will be more robust now