Fix entry point detection