added check for appkit loading
fixed warnings