Fixes for dbDelta call and some PHP notices