Some small performance tweaking