Added timeout handler

Added timeout handler in effort to prevent the "neverending loading"
icon.