In this paper, we propose a new algorithm to improve the accuracy of indoor positioning techniques using Wi-Fi access points as beacon nodes. The proposed algorithm is based on the Weighted Centroid algorithm, a popular method widely used for indoor positioning, however, it improves some disadvantages of the Weighted Centroid method and also for other kinds of indoor positioning methods, by using the received signal strength correction method and genetic algorithm to prevent the signal strength fluctuation phenomenon, which is caused by the complex propagation environment. To validate the performance of the proposed algorithm, we conducted experiments in a complex indoor environment, and collect a list of Wi-Fi signal strength data from several access points around the standing user location. By utilizing this kind of algorithm, we can obtain a high accuracy positioning system, which can be used in any building environment with an available Wi-Fi access point setup as a beacon node.